#define SAFE_DEL(a) {if(a){delete (a);(a)=NULL;}}